<?php
/**
 * 后台菜单配置
 */
use think\Session;
$sessionInfo=Session::get('yoshop_adminuser');

//平台菜单页
if($sessionInfo['user']['type']==1){
    return [
        'index' => [
            'name' => '首页',
            'icon' => 'icon-home',
            'index' => 'index/index',
        ],
        'general' => [
            'name' => '基础信息管理',
            'icon' => 'icon-daohang',
            'index' => 'general.storage/index',
            'submenu' => [
               /*[
                    'name' => '基础配置',
                    'index' => 'general.basic/index',
                ],*/
               /* [
                    'name' => '小程序配置',
                    'index' => 'general.wechat/wgindex',
                ],*/
                [
                    'name' => '上传设置',
                    'index' => 'general.storage/index',
                ],
                /*[
                    'name' => '短信设置',
                    'index' => 'general.storage/index',
                ]*/
            ]
        ],
        'store' => [
            'name' => '板块管理',
            'icon' => 'icon-shangcheng',
            'index' => 'store.store/index',
            'submenu' => [
                [
                    'name' => '板块列表',
                    'index' => 'store.store/index',
                    'uris' => [
                        'store/index',
                        'store/add',
                    ]
                ]
            ],
        ],
        'agent' => [
            'name' => '客户信息查看',
            'icon' => 'icon-daohangpinlei',
            'index' => 'agent.agent/index',
            'submenu' => [
                [
                    'name' => '客户列表',
                    'index' => 'agent.agent/index',
                    'uris' => [
                        'agent.agent/index',
                        'agent.agent/add',
                        'agent.agent/edit',
                    ]
                ]
            ],
        ],
        'dividend'=>[
            'name' => '自营公司管理',
            'icon' => 'am-icon-cubes',
            'index' => 'dividend.system/index',
            'submenu' => [
                [
                    'name' => '自营公司列表',
                    'index' => 'dividend.system/index',
                ]
            ]
        ],
        'finance' => [
            'name' => '渠道公司查看',
            'icon' => 'icon-iconfonticonfontshan',
            'index' => 'finance.apply/index',
            'submenu' => [
                [

                    'name' => '渠道公司列表',
                    'index' => 'finance.apply/index',
                ]
            ],
        ],
        'content' => [
            'name' => '房源信息查看',
            'icon' => 'icon-wenzhang',
            'index' => 'content.build/index',
            'submenu' => [
                [
                    'name' => '房源列表',
                    'index' => 'content.build/index',
                    'uris' => [
                        'content.build/index',
                        'content.build/add',
                        'content.build/edit',
                    ]
                ]
            ]
        ],
        'zixun' => [
            'name' => '资讯管理',
            'icon' => 'icon-wenzhang',
            'index' => 'zixun.build/index',
            'submenu' => [
                [
                    'name' => '资讯列表',
                    'index' => 'zixun.build/index',
                    'uris' => [
                        'zixun.build/index',
                        'zixun.build/add',
                        'zixun.build/edit',
                    ]
                ]
            ]
        ],
    ];
}elseif ($sessionInfo['user']['type']==2){
    //自营公司菜单页
    return [
        'index' => [
            'name' => '首页',
            'icon' => 'icon-home',
            'index' => 'index/index',
        ],
        'agent' => [
            'name' => '客户信息查看',
            'icon' => 'icon-daohangpinlei',
            'index' => 'agent.agent/index',
            'submenu' => [
                [
                    'name' => '客户列表',
                    'index' => 'agent.agent/index',
                    'uris' => [
                        'agent.agent/index',
                        'agent.agent/add',
                        'agent.agent/edit',
                    ]
                ]
            ],
        ],
        'xiangmuzu' => [
            'name' => '项目组管理',
            'icon' => 'icon-wenzhang',
            'index' => 'xiangmuzu.article/index',
            'submenu' => [
                [
                    'name' => '项目组列表',
                    'index' => 'xiangmuzu.article/index',
                    'uris' => [
                        'xiangmuzu.article/index',
                        'xiangmuzu.article/add',
                        'xiangmuzu.article/edit',
                    ]
                ]
            ]
        ],
        'zhiye' => [
            'name' => '公司人员管理',
            'icon' => 'icon-wenzhang',
            'index' => 'zhiye.company/index',
            'submenu' => [
                [
                    'name' => '员工列表',
                    'index' => 'zhiye.company/index',
                    'uris' => [
                        'zhiye.company/index',
                        'zhiye.company/add',
                        'zhiye.company/edit',
                    ]
                ]
            ]
        ],
        'finance' => [
            'name' => '渠道公司管理',
            'icon' => 'icon-iconfonticonfontshan',
            'index' => 'finance.apply/index',
            'submenu' => [
                [
                    'name' => '渠道公司列表',
                    'index' => 'finance.apply/index',
                ]
            ],
        ],
        'content' => [
            'name' => '房源信息管理',
            'icon' => 'icon-wenzhang',
            'index' => 'content.build/index',
            'submenu' => [
                [
                    'name' => '房源列表',
                    'index' => 'content.build/index',
                    'uris' => [
                        'content.build/index',
                        'content.build/add',
                        'content.build/edit',
                    ]
                ]
            ]
        ],
    ];
}else{
//渠道公司菜单页
    return [
        'index' => [
            'name' => '首页',
            'icon' => 'icon-home',
            'index' => 'index/index',
        ],
        'agent' => [
            'name' => '客户信息查看',
            'icon' => 'icon-daohangpinlei',
            'index' => 'agent.agent/index',
            'submenu' => [
                [
                    'name' => '客户列表',
                    'index' => 'agent.agent/index',
                    'uris' => [
                        'agent.agent/index',
                        'agent.agent/add',
                        'agent.agent/edit',
                    ]
                ]
            ],
        ],
        'content' => [
            'name' => '房源信息查看',
            'icon' => 'icon-wenzhang',
            'index' => 'content.build/index',
            'submenu' => [
                [
                    'name' => '房源列表',
                    'index' => 'content.build/index',
                    'uris' => [
                        'content.build/index',
                        'content.build/add',
                        'content.build/edit',
                    ]
                ]
            ]
        ],
        'qudao' => [
            'name' => '渠道人员管理',
            'icon' => 'icon-wenzhang',
            'index' => 'qudao.company/index',
            'submenu' => [
                [
                    'name' => '渠道人员列表',
                    'index' => 'qudao.company/index',
                    'uris' => [
                        'qudao.company/index',
                        'qudao.company/add',
                        'qudao.company/edit',
                    ]
                ]
            ]
        ],
    ];
}
